<template>
    <div class="content" style="padding:0 4vw;margin-top:15px">
      <div>
        <span style="display:inline-block;height:30px;width:30px;text-align:center;line-height:30px;background:#FF4C50;color:#ffffff;font-size:18px">问</span>
        <div style="display:inline-block;font-size:18px;margin-left:10px">{{title}}</div>
      </div>
      <div  style="margin-top:15px">
        <span style="display:inline-block;height:30px;width:30px;text-align:center;line-height:30px;background:#4DA0FE;color:#ffffff;font-size:18px;vertical-align:top;">答</span>
        <div class="contentDetail" v-html="content" style="display:inline-block;margin-left:15px"></div>
      </div>
      <div style="margin-top:20px">
        <span style="text-align:center;display:block;color:#666666;font-size:13px">解答对你有帮助吗?</span>
        <div style="text-align:center;margin-top:15px" id="isUse">
          <mu-button :ripple=false :flat=true :class="isUse1" style="margin-right:20px" @click='getUse(1)'>有用</mu-button>
          <mu-button :ripple=false :flat=true :class="isUse2" @click='getUse(2)'>没用</mu-button>

        </div>
      </div>
      
    </div>
</template>

<script>
import questionDetail from "../components/problemDetail/questionDetail.vue";
import answerDetail from "../components/problemDetail/answerDetail.vue";
import isHelp from "../components/problemDetail/isHelp.vue";
import pageBottom from "../components/help_server/pageBottom.vue";
import request from "@/request/index.js"
export default {
  name: "problemDetail",
  components: {
    questionDetail,
    answerDetail,
    isHelp,
    pageBottom,
    // isUse1:'useActive',
    // isUse2:'noUse',
    
  },
  data() {
    return {
      content: "",
      title:'',
      isUse1:'useActive',
      isUse2:'noUse',
      isClick:true
      // isUse:['useActive','noUse'],
    };
  },
  methods: {
    getLogin: function() {
      var time = Date.parse(new Date()) / 1000;
      if (this._globe.isAndroid) {
        if (window.android != null && typeof window.android != "undefined") {
          window.android.callLogin();
        } else {
        }
      }
      if (this._globe.isIos) {
        if (window.webkit) {
          window.webkit.messageHandlers.callAppHelp.postMessage(num);
        }
      }
    },
    getUse: function(n){
      var that=this;
      
      if(that.isClick){
        request.setUse(this,n)
      }
    }
  },
  mounted() {
    var that = this;

    this.help_type_id = this.$route.query.help_type_id;
    if (this.$route.query.page) {
      this.page = this.$route.query.page;
    }
    request.getHelpInfo(this)
  }
};
</script>

<style lang="scss">
.contentDetail{
  width:290px;
}
@media screen and (max-width: 330px) {
    .contentDetail{
      width:245px;
    }
}
#isUse{
  .useActive{
    background:#FF4C50;
    color:#ffffff;
  }
  .noUse{
    background:#f5f5f5;
    color:#666666;
  }
}

</style>
